
//
//  UIImageView+Action.m
//  BrushFace
//
//  Created by timer_q on 16/1/29.
//  Copyright © 2016年 Zzz. All rights reserved.
//

#import "UIImageView+Action.h"

@implementation UIImageView (Action)


TapAction _tapAction;
- (void)addTapAction:(TapAction)action{
    _tapAction = action;
    UITapGestureRecognizer *tap = [[UITapGestureRecognizer alloc]initWithTarget:self action:@selector(tapWithSelf:)];
    [self addGestureRecognizer:tap];
    self.userInteractionEnabled = YES;
}
- (void)tapWithSelf:(UITapGestureRecognizer *)tap{
    _tapAction(self);
}
@end
